/*
 *  boolmain.cpp
 *  vector
 *
 *  Created by Fredrik Gustafsson on 2010-11-29.
 *  Copyright 2010 KTH. All rights reserved.
 *
 */


#include "boolvector.h"
#include <iostream>
#include <time.h>
using namespace std;

time_t start,final;

int main() {
	Vector<bool> b(0, false);
	//cout<<"should be empty:" << endl << b << endl;

	Vector<bool> a(30, true);
	b= Vector<bool>(30, false);
	b[0] = true;
	b[2] = true;
	b[4] = true;
	Vector<bool> c =(a^b);
	cout<<"should be " << endl << "111000000000000000000000000000:" << endl << c << endl;
	
	c.clear();
	cout << "should be " << endl << "000000000000000000000000000000:" << endl << c << endl;
	
	
	Vector<bool> v(31);	// Skapa en 31 stor vektor 
	v[3] = true; Vector<bool> w;	
	// tom vektor 
	std::copy(v.begin(), v.end(), std::back_inserter(w)); 
	std::cout << std::distance(v.begin(), v.end());
	// konstant iterator och konvertering 
	Vector<bool>::const_iterator it = v.begin(); std::advance(it, 2);
	
	std::cout << v << std::endl;
	std::sort(v.begin(), v.end());
	std::cout << v << std::endl;
	
}